package com.company;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @author jrue
 * @version 1.0
 * @date 2020/3/17 20:23
 */
public class Main07 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Set<String> set = new HashSet<>();
        set.add(s);

        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            set.add(String.valueOf(chars[i]));
        }
        for (int i = 0; i < chars.length - 1; i++) {
            StringBuilder sb= new StringBuilder();
            sb.append(chars[i]);
            for (int j = i + 1; j < chars.length; j++) {
                sb.append(chars[j]);
                set.add(sb.toString());
            }
        }

        System.out.println(set.size());
    }

}
